package com.ezhuan.users.pojo;

import java.util.Date;

import com.ezhuan.common.pojo.BasePojo;

/**
 * 用户提现历史资料
 * 
 * @author wangshSxt
 *
 */
public class AUsersWithdraw extends BasePojo<AUsersWithdraw>
{
	private int usersId;
	private byte withType;
	private String thirdName;
	private String extend1;
	private byte status;
	private Date createTime;
	private Date updateTime;
	private Date pubTime;

	/* 关联对象 */
	private AUsers usersObject;

	/* 字符串描述 */
	private String statusStr;
	private String withTypeStr;

	@Override
	public String getTableName()
	{
		return "a_users_withdraw";
	}

	public int getUsersId()
	{
		return usersId;
	}

	public void setUsersId(int usersId)
	{
		this.usersId = usersId;
	}

	public byte getWithType()
	{
		return withType;
	}

	public void setWithType(byte withType)
	{
		this.withType = withType;
	}

	public String getThirdName()
	{
		return thirdName;
	}

	public void setThirdName(String thirdName)
	{
		this.thirdName = thirdName;
	}

	public String getExtend1()
	{
		return extend1;
	}

	public void setExtend1(String extend1)
	{
		this.extend1 = extend1;
	}

	public byte getStatus()
	{
		return status;
	}

	public void setStatus(byte status)
	{
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getPubTime()
	{
		return pubTime;
	}

	public void setPubTime(Date pubTime)
	{
		this.pubTime = pubTime;
	}

	public AUsers getUsersObject()
	{
		return usersObject;
	}

	public void setUsersObject(AUsers usersObject)
	{
		this.usersObject = usersObject;
	}

	public String getStatusStr()
	{
		// 根据状态值获取字符串描述
			AUsersWithdrawEnum[] withdrawEnums = AUsersWithdrawEnum.values();
			for (int i = 0; i < withdrawEnums.length; i++)
			{
				AUsersWithdrawEnum withdrawEnum = withdrawEnums[i];
				if (withdrawEnum.toString().startsWith("STATUS_"))
				{
					// 表示是状态的标识
					if (withdrawEnum.getStatus() == this.getStatus())
					{
						this.statusStr = withdrawEnum.getName();
						break;
					}
				}
			}
		return statusStr;
	}

	public String getWithTypeStr()
	{
		return withTypeStr;
	}
}
